<%@ page language="java" import="java.util.ArrayList"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>admin/basicInfo/commodities/" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link href="../../../css/skin.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript">

 function changeState(obj, checkList) {
		if(obj.checked == true) {
			if(checkList != null && checkList.length == null) {
				checkList.checked = true;
			}
			for(var i=0; i<checkList.length; i++) {
				checkList[i].checked = true;
			}
		}
		else {
			if(checkList != null && checkList.length == null) {
				checkList.checked = false;
			}
			for(var i=0; i<checkList.length; i++) {
				checkList[i].checked = false;
			}
		}
	}
function noSelAll()
{
	for(i=0;i<document.form1.id.length;i++)
	{
		if(document.form1.id[i].checked)
		{
			document.form1.id[i].checked=false;
		}
	}
}

</script>
	</head>
	<body>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<td width="17" valign="top"
					background="../../../images/mail_leftbg.gif">
					<img src="../../../images/left-top-right.gif" width="17"
						height="29" />
				</td>
				<td valign="top" background="../../../images/content-bg.gif">
					<table width="100%" height="31" border="0" cellpadding="0"
						cellspacing="0" class="left_topbg" id="table2">
						<tr>
							<td height="31">
								<div class="titlebt">
									商品查询
								</div>
							</td>

						</tr>
					</table>
				</td>
				<td width="16" valign="top"
					background="../../../images/mail_rightbg.gif">
					<img src="../../../images/nav-right-bg.gif" width="16" height="29" />
				</td>
			</tr>
			<tr>
				<td valign="middle" background="../../../images/mail_leftbg.gif">
					&nbsp;
				</td>
				<td valign="top" bgcolor="#F7F8F9">

					<table width="98%" border="0" align="center" cellpadding="0"
						cellspacing="0">
						<tr>
							<td height="26" background="../../../images/newlinebg3.gif">

								<table width="98%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td align="center">
											<a href="Category-list.action" class="coolbg">商品类别列表</a>
											<a href="Category-add.jsp" class="coolbg">增加商品类别信息</a>
											<a href="Category-search.jsp" class="coolbg">查询商品类别信息</a>
											<a href="Commodity-list.action" class="coolbg">商品列表</a>
											<a href="Commodity-add.action" class="coolbg">增加商品信息</a>
											<a href="Commodity-search.action" class="coolbg">查询商品信息</a>
										</td>
									</tr>
								</table>

								<form name="form1" action="Commodity-searchCommit.action">
									<table width="98%" border="0" cellpadding="2" cellspacing="1"
										bgcolor="#D1DDAA" align="center" style="margin-top: 8px">
										<tr bgcolor="#E6EDF2">
											<td height="24" colspan="19"
												background="../../../images/tbg.gif">
												&nbsp;搜索条件:&nbsp;&nbsp;
												<label class="coolbg">
													编号:
												</label>
												&nbsp;
												<input type='text' name='commodity.id' value=''
													style='width: 150px' class="coolbg" />
												<label class="coolbg">
													名称:
												</label>
												&nbsp;
												<input type='text' name='commodity.commodity_name' value=''
													style='width: 150px' class="coolbg" />
												<label class="coolbg">
													商品类型:
												</label>
												&nbsp;
												<select name="commodity.category.id" id="categories"
													style='width: 100' class="tdinput4">
													<option value="">

													</option>
													<s:iterator value="categories" var="c">
														<option value="<s:property value="#c.id"/>">
															<s:property value="#c.category_name" />
														</option>
													</s:iterator>
												</select>
												<input name="button" type="submit" class="coolbg" value="查询" />
												<label class="coolbg">
													供应商商品列表:
												</label>
												&nbsp;
												<select name="provider.id" id="provider" style='width: 100'
													class="tdinput4">
													<option value="">

													</option>
													<s:iterator value="providers" var="c">
														<option value="<s:property value="#c.id"/>">
															<s:property value="#c.provider_name" />
														</option>
													</s:iterator>
												</select>
												<input name="button" type="submit" class="coolbg" value="查询" />
											</td>
										</tr>
										<tr align="center" bgcolor="#EEF4EA" height="22">
											<td width="4%">
												编号
											</td>
											<td width="3%">
												选择
											</td>
											<td width="7%">
												商品名称
											</td>
											<td width="5%">
												简称
											</td>
											<td width="5%">
												商品类别
											</td>
											<td width="7%">
												供应商
											</td>
											<td width="7%">
												产地
											</td>
											<td width="7%">
												单位
											</td>
											<td width="7%">
												规格
											</td>
											<td width="8%">
												包装信息
											</td>
											<td width="7%">
												批准文号
											</td>
											<td width="7%">
												批号
											</td>
											<td width="3%">
												库存数量
											</td>
											<td width="3%">
												当前价格
											</td>
											<td width="3%">
												库存上限
											</td>
											<td width="3%">
												库存下限
											</td>
											<td width="8%">
												操作
											</td>
										</tr>
										<s:iterator value="commodities" var="c">
											<tr align='center' bgcolor="#FFFFFF"
												onMouseMove="javascript:this.bgColor='#FCFDEE';"
												onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
												<td>
													<s:property value="#c.id" />
												</td>
												<td>
													<input type="checkbox" id="selectedList"
														name="selectedList" value="<s:property value="#c.id"/>"
														class="np">
												</td>
												<td>
													<s:property value="#c.commodity_name" />
												</td>
												<td>
													<s:property value="#c.short_name" />
												</td>
												<td>
													<s:property value="#c.category.category_name" />
												</td>
												<td>
													<table>
														<s:if test="#c.providers.size()!=0">
															<s:iterator value="#c.providers" var="cp">
																<tr>
																	<td>
																		<s:property value="#cp.provider_name" />
																	</td>
																</tr>
															</s:iterator>
														</s:if>
														<s:else>
															<tr>
																<td>
																	无供应商
																</td>
															</tr>
														</s:else>
													</table>
												</td>
												<td>
													<s:property value="#c.product_area" />
												</td>
												<td>
													<s:property value="#c.unit" />
												</td>
												<td>
													<s:property value="#c.scale" />
												</td>
												<td>
													<s:property value="#c.package_info" />
												</td>
												<td>
													<s:property value="#c.permission_number" />
												</td>
												<td>
													<s:property value="#c.lot_number" />
												</td>
												<td>
													<s:property value="#c.stock_count" />
												</td>
												<td>
													<s:property value="#c.current_price" />
												</td>
												<td>
													<s:property value="#c.max_store" />
												</td>
												<td>
													<s:property value="#c.min_store" />
												</td>
												<td>
													<a
														href="Commodity-update?commodity.id=<s:property value="#c.id"/>">编辑</a>
													|
													<a
														href="Commodity-delete?commodity.id=<s:property value="#c.id"/>">删除</a>
												</td>
											</tr>
										</s:iterator>

										<tr bgcolor="#FAFAF1">
											<td height="28" colspan="19">
												<a href="" class="coolbg">上一页</a>
												<a href="" class="coolbg">&nbsp;1&nbsp;</a>
												<a href="" class="coolbg">&nbsp;2&nbsp;</a>
												<a href="" class="coolbg">&nbsp;3&nbsp;</a>
												<a href="" class="coolbg">&nbsp;...&nbsp;</a>
												<a href="" class="coolbg">&nbsp;下一页&nbsp;</a>
												<input type="text" size="3" class="input" />
												<a href="" class="coolbg">go</a>
											</td>
										</tr>
										<tr align="right" bgcolor="#EEF4EA">
											<td height="36" colspan="19" align="center">
												<!--·­Ò³´úÂë -->
											</td>
										</tr>
									</table>
								</form>
							</td>
						</tr>
					</table>

				</td>
				<td background="../../../images/mail_rightbg.gif">
					&nbsp;
				</td>
			</tr>
			<tr>
				<td valign="bottom" background="../../../images/mail_leftbg.gif">
					<img src="../../../images/buttom_left2.gif" width="17" height="17" />
				</td>
				<td background="../../../images/buttom_bgs.gif">
					<img src="../../../images/buttom_bgs.gif" width="17" height="17">
				</td>
				<td valign="bottom" background="../../../images/mail_rightbg.gif">
					<img src="../../../images/buttom_right2.gif" width="16" height="17" />
				</td>
			</tr>
		</table>
		<s:debug></s:debug>
	</body>
</html>
